<%@page import="com.zhuoshi.bean.SpareBean"%>
<%@page import="com.zhuoshi.dao.SpareDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
request.setCharacterEncoding("UTF-8");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
SpareDao dao = new SpareDao();
List<SpareBean> list = dao.getList();
pageContext.setAttribute("list", list);

String action = request.getParameter("action");
if("search".equals(action)){
	//String clientshort = request.getParameter("clientshort");
	//out.print("我要查询的第一个条件:"+clientshort);
	//out.print("我开始查询了");
}


%>

<!DOCTYPE html>
<!-- saved from url=(0039)http://localhost:8080/EMIS/SpareServlet -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta http-equiv="Cache-Control" content="no-siteapp">
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="template/H-ui.min.css">
<link rel="stylesheet" type="text/css" href="template/H-ui.admin.css">
<link rel="stylesheet" type="text/css" href="template/iconfont.css">
<link rel="stylesheet" type="text/css" href="template/icheck.css">
<link rel="stylesheet" type="text/css" href="template/skin.css" id="skin">
<link rel="stylesheet" type="text/css" href="template/style.css">
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>备件管理</title>
<link rel="stylesheet" href="template/layer.css" id="layui_layer_skinlayercss">
<link href="template/WdatePicker.css" rel="stylesheet" type="text/css"></head>
<body>
<form name="form2" action="http://localhost:8080/EMIS/delbeijian" method="post" id="form2">
<input type="hidden" name="spare_id" id="spare_id">
</form>
<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页 <span class="c-gray en">&gt;</span> 系统管理 <span class="c-gray en">&gt;</span> 备件管理 
</nav>
<div class="page-container">
	
<form action="?action=search" method="post">
	<div class="text-c"> 
		<input type="text" class="input-text" style="width:120px" placeholder="输入客户简称" id="clientshort" name="clientshort">
		<input type="text" class="input-text" style="width:120px" placeholder="输入备件名称" id="spare" name="spare">
		<input type="text" class="input-text" style="width:120px" placeholder="输入规格型号" id="model" name="model">
		<input type="text" class="input-text" style="width:120px" placeholder="输入供货商名称" id="supplier" name="supplier">
		<button type="submit" class="btn btn-success radius" id="search" name="search"><i class="Hui-iconfont"></i> 搜备件</button>
	</div>
</form>
	

	<div class="mt-20">
		<div id="DataTables_Table_0_wrapper" class="dataTables_wrapper no-footer"><div class="dataTables_length" id="DataTables_Table_0_length"><label>显示 <select name="DataTables_Table_0_length" aria-controls="DataTables_Table_0" class="select"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> 条</label></div>
		  <table class="table table-border table-bordered table-hover table-bg table-sort dataTable no-footer" id="DataTables_Table_0" role="grid" aria-describedby="DataTables_Table_0_info">
			<thead>
     <tr class="text-c" role="row">
     <!-- <th class="sorting_disabled" rowspan="1" colspan="1" aria-label="客户名称" style="width: 293px;">客户名称</th> -->
     <th class="sorting_desc" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="descending" aria-label="客户名称: 升序排列" style="width: 98px;">客户名称</th>
     <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="备件名称: 升序排列" style="width: 98px;">备件名称</th>
     <th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="规格型号: 升序排列" style="width: 100px;">规格型号</th>
     <th class="sorting" rowspan="1" colspan="1" aria-label="供货商名称" style="width: 294px;">供货商名称</th>
     
     </tr>
			</thead>
          <tbody>
          
                    
          
                    
          
                    
          
                    
          
                    
          
                    
          	
		<c:forEach items="${list }" var="bean">
		<tr class="text-c event" role="row">
					<td>${bean.custname } </td>
					<td class="sorting_1">${bean.sqarename }</td>
					<td>${bean.modeltype }</td>
					<td>${bean.supplier }</td>
				</tr>
				
				</c:forEach>
				
				
				</tbody>
		</table><div class="dataTables_info" id="DataTables_Table_0_info" role="status" aria-live="polite">显示 1 到 6 ，共 6 条</div><div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate"><a class="paginate_button previous disabled" aria-controls="DataTables_Table_0" data-dt-idx="0" tabindex="0" id="DataTables_Table_0_previous">上一页</a><span><a class="paginate_button current" aria-controls="DataTables_Table_0" data-dt-idx="1" tabindex="0">1</a></span><a class="paginate_button next disabled" aria-controls="DataTables_Table_0" data-dt-idx="2" tabindex="0" id="DataTables_Table_0_next">下一页</a></div></div>
	</div>
</div>
	<footer class="footer mt-20">
	<div class="container">
		Copyright ©       本后台系统由KEG提供技术支持
	</div>
    </footer>
<script type="text/javascript" src="template/jquery.min.js"></script> 
<script type="text/javascript" src="template/layer.js"></script>
<script type="text/javascript" src="template/laypage.js"></script> 
<script type="text/javascript" src="template/WdatePicker.js"></script> 
<script type="text/javascript" src="template/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="template/H-ui.js"></script><a href="javascript:void(0)" class="Hui-iconfont toTop" title="返回顶部" alt="返回顶部" style="display:none"></a> 
<script type="text/javascript" src="template/H-ui.admin.js"></script> 
<script type="text/javascript">
$('.table-sort').dataTable({
			"aaSorting" : [ [ 1, "desc" ] ],//默认第几个排序
			"bStateSave" : true,//状态保存
			"aoColumnDefs" : [
			//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
			{
				"orderable" : false,
				"aTargets" : [ 0, 3 ]
			} // 制定列不参与排序
			]
		});
</script>

</body></html>